#!/bin/bash

sudo apt install  --no-install-recommends qemu-user-static binfmt-support
update-binfmts --enable qemu-riscv64
update-binfmts --display qemu-riscv64
wget https://github.com/multiarch/qemu-user-static/releases/download/v7.0.0-7/qemu-riscv64-static
mv qemu-riscv64-static qemu-riscv64
sudo rm -rf /usr/bin/qemu-riscv64
sudo cp qemu-riscv64 /usr/bin/
sudo chmod a+x /usr/bin/qemu-riscv64
